<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="/header.jsp" %>
<body>

    <div class="row">
        <c:if test="${!empty goods }">
            <c:forEach items="${goods}" var="good">
                <div class="col-md-3">
                    <div class="thumbnail">
                        <div style="width:212px;height:400px;padding:15px 0 0 20px">
                            <a href="${pageContext.request.contextPath}/goods/goodsDetail.action?goods_id=${good.goodsId}">
                                <img height="172px" alt="暂无图片" src="${pageContext.request.contextPath}${good.goodsPic}"></a>
                            <div class="caption text-center">
                                <h4 class="substr color">${good.goodsName}</h4>
                                <p>
                                    原价<span class="glyphicon glyphicon-yen" aria-hidden="true"></span>${good.goodsPrice}
                                    <span class="glyphicon glyphicon-hand-right" aria-hidden="true"></span>
                                </p>
                                <p>
                                    现售<span class="label label-pill label-info">
                            <span class="glyphicon glyphicon-yen"
                                  aria-hidden="true"></span>${good.goodsPrice - good.goodsDiscount}</span>
                                </p>
                                <p>共售出${good.goodsSales}件</p>
                            </div>
                        </div>
                    </div>
                </div>
            </c:forEach>
        </c:if>
        <c:if test="${empty goods}">
            <div class="col-md-12">
                <div class="alert alert-danger col-md-2" role="alert">对不起，暂无此类商品</div>
            </div>
        </c:if>
    </div>

    <%@include file="/footer.jsp" %>


